import { useStreams } from '@/lib/utils'
import services from '@/services'
import { ContactType } from '@/services/contacts'
import './index.module.less'

import GroupNotice from './group-notice'

export default function GroupTools() {
  const [contact] = useStreams(services.contacts.current.contact)
  if (!contact || contact.type !== ContactType.group) return null

  return <div styleName="group-tools">
    <GroupNotice group={contact} />
  </div>
}
